import javafx.beans.binding.ListBinding;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Chris
 */
public class Blood {

    private List<BloodObserver> observers;

    public Blood() {
        observers = new ArrayList<>();
    }

    public void addObserver(BloodObserver ob) {
        observers.add(ob);
    }

    public void remove(BloodObserver ob) {
        observers.remove(ob);
    }

    private void notice() {
        for (BloodObserver temp : observers) {
            temp.update();
        }
    }

    public void change(int max) {
        if (max > 8) {
            this.notice();
        }
    }
}
